<?php
require_once PATH_SITE.'cn/royan/php/values/ServerRoom.class.php';
require_once PATH_SITE.'cn/royan/php/utils/builders/Builder.class.php';
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of BuilderRoom
 *
 * @author yanr
 */
class BuilderRoom extends Builder
{
    static private $__id;
    //put your code here
    public function __construct( $value )
    {
        $this->config = $value;
    }
    
    public function build() {
        $this->obj = new ServerRoom();
        $this->obj->__set( "id",            (int)self::$__id++ );
        $this->obj->__set( "name",          $this->config["name"] );
        $this->obj->__set( "linkNumber",    $this->config["linkNumber"] );
        $this->obj->__set( "password",      $this->config["password"] );
        $this->obj->__set( "area",          $this->config["area"]);
        $this->obj->__set( "users",         array() );
        
        RETURN parent::build();
    }
}

?>
